Skip to content

build: tslint rule to enforce html tags escaping in comments - #8200

Merged
jelbourn merged 6 commits into
angular:masterfrom
julianobrasil:tslint-html-rule
Jan 26, 2018
Merged

jelbourn merged 6 commits into
angular:masterfrom
julianobrasil:tslint-html-rule

Conversation

@julianobrasil

@julianobrasil julianobrasil commented Nov 2, 2017 •

Copy link
Copy Markdown
Contributor

Refactoring of #5825 logic

cc @willshowell

This rule will look for:

1 - Any HTML open/close tag delimiter (< or >) outside backtick pairs (``)

/** 
 * The using of <svg> is very good because...
 */
/** 
 * Look for every occurrency of `i <= 18...
 */

2 - Any "opening" backtick without its "closing" match:

/** 
 * The using of `<svg> is very good because...
 */
/** 
 * We recommend using backticks (`) to escape...
 */

And it will allow any html provided it's between backtick matching pairs:

/** 
 * The using of `    <div><br></div> is very` good because...
 */

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants